package com.openvas.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.openvas.commons.common.annotation.Excel;
import com.openvas.commons.common.core.domain.BaseEntity;

/**
 * 扫描任务对象 table_task
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
public class TableTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键名称 */
    private String taskId;

    /** 目标id */
    @Excel(name = "目标id")
    private String targetId;

    /** 扫描id */
    @Excel(name = "扫描id")
    private String scannerId;

    /** 扫描配置id */
    @Excel(name = "扫描配置id")
    private String configId;

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String taskName;

    /** 任务描述（也就是备注） */
    @Excel(name = "任务描述", readConverterExp = "也=就是备注")
    private String comment;

    /** 警告提示 */
    @Excel(name = "警告提示")
    private String alertId;

    /** 定时器id */
    @Excel(name = "定时器id")
    private String scheduleId;

    /** 扫描的报告总数 */
    @Excel(name = "扫描的报告总数")
    private Integer reportCount;

    /** 任务当前的状态（完成，进行中（进度条），请求中，新建，暂停） */
    @Excel(name = "任务当前的状态", readConverterExp = "完=成，进行中（进度条")
    private String status;

    /** 最后一次扫描的报告的id */
    @Excel(name = "最后一次扫描的报告的id")
    private String lastReportId;

    /** 最后一次扫描开始的时间（只有扫描完成后才有） */
    @Excel(name = "最后一次扫描开始的时间", readConverterExp = "只=有扫描完成后才有")
    private Date lastReportTime;

    /** 最后一次扫描的安全性等级提示 */
    @Excel(name = "最后一次扫描的安全性等级提示")
    private String severity;

    /** 最后一次扫描相对于上一次漏洞是否有变化 */
    @Excel(name = "最后一次扫描相对于上一次漏洞是否有变化")
    private String trend;

    /** target的名称 */
    @Excel(name = "target的名称")
    private String targetName;

    /** scanner的名称 */
    @Excel(name = "scanner的名称")
    private String scannerName;

    /** scanner的类别 */
    @Excel(name = "scanner的类别")
    private String scannerType;

    /** 配置的名称 */
    @Excel(name = "配置的名称")
    private String configName;

    /** 扫描的执行顺序 */
    @Excel(name = "扫描的执行顺序")
    private String hostsOrdering;

    /** 所属用户 */
    @Excel(name = "所属用户")
    private String userName;

    /** 任务创建时间 */
    @Excel(name = "任务创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setTaskId(String taskId)
    {
        this.taskId = taskId;
    }

    public String getTaskId() 
    {
        return taskId;
    }
    public void setTargetId(String targetId) 
    {
        this.targetId = targetId;
    }

    public String getTargetId() 
    {
        return targetId;
    }
    public void setScannerId(String scannerId) 
    {
        this.scannerId = scannerId;
    }

    public String getScannerId() 
    {
        return scannerId;
    }
    public void setConfigId(String configId) 
    {
        this.configId = configId;
    }

    public String getConfigId() 
    {
        return configId;
    }
    public void setTaskName(String taskName) 
    {
        this.taskName = taskName;
    }

    public String getTaskName() 
    {
        return taskName;
    }
    public void setComment(String comment) 
    {
        this.comment = comment;
    }

    public String getComment() 
    {
        return comment;
    }
    public void setAlertId(String alertId) 
    {
        this.alertId = alertId;
    }

    public String getAlertId() 
    {
        return alertId;
    }
    public void setScheduleId(String scheduleId) 
    {
        this.scheduleId = scheduleId;
    }

    public String getScheduleId() 
    {
        return scheduleId;
    }
    public void setReportCount(Integer reportCount) 
    {
        this.reportCount = reportCount;
    }

    public Integer getReportCount() 
    {
        return reportCount;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setLastReportId(String lastReportId) 
    {
        this.lastReportId = lastReportId;
    }

    public String getLastReportId() 
    {
        return lastReportId;
    }
    public void setLastReportTime(Date lastReportTime) 
    {
        this.lastReportTime = lastReportTime;
    }

    public Date getLastReportTime() 
    {
        return lastReportTime;
    }
    public void setSeverity(String severity) 
    {
        this.severity = severity;
    }

    public String getSeverity() 
    {
        return severity;
    }
    public void setTrend(String trend) 
    {
        this.trend = trend;
    }

    public String getTrend() 
    {
        return trend;
    }
    public void setTargetName(String targetName) 
    {
        this.targetName = targetName;
    }

    public String getTargetName() 
    {
        return targetName;
    }
    public void setScannerName(String scannerName) 
    {
        this.scannerName = scannerName;
    }

    public String getScannerName() 
    {
        return scannerName;
    }
    public void setScannerType(String scannerType) 
    {
        this.scannerType = scannerType;
    }

    public String getScannerType() 
    {
        return scannerType;
    }
    public void setConfigName(String configName) 
    {
        this.configName = configName;
    }

    public String getConfigName() 
    {
        return configName;
    }
    public void setHostsOrdering(String hostsOrdering) 
    {
        this.hostsOrdering = hostsOrdering;
    }

    public String getHostsOrdering() 
    {
        return hostsOrdering;
    }
    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }

    @Override
    public String toString() {
        return "TableTask{" +
                "taskId='" + taskId + '\'' +
                ", targetId='" + targetId + '\'' +
                ", scannerId='" + scannerId + '\'' +
                ", configId='" + configId + '\'' +
                ", taskName='" + taskName + '\'' +
                ", comment='" + comment + '\'' +
                ", alertId='" + alertId + '\'' +
                ", scheduleId='" + scheduleId + '\'' +
                ", reportCount=" + reportCount +
                ", status='" + status + '\'' +
                ", lastReportId='" + lastReportId + '\'' +
                ", lastReportTime=" + lastReportTime +
                ", severity='" + severity + '\'' +
                ", trend='" + trend + '\'' +
                ", targetName='" + targetName + '\'' +
                ", scannerName='" + scannerName + '\'' +
                ", scannerType='" + scannerType + '\'' +
                ", configName='" + configName + '\'' +
                ", hostsOrdering='" + hostsOrdering + '\'' +
                ", userName='" + userName + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
